System and method for supporting multi-tenancy in an application server, cloud, or other environment

ABSTRACT

In accordance with an embodiment, described herein is a system and method for supporting multi-tenancy in an application server, cloud, on-premise, or other environment, which enables categories of components and configurations to be associated with particular application instances or partitions. Resource group templates define, at a domain level, collections of deployable resources that can be referenced from resource groups. Each resource group is a named, fully-qualified collection of deployable resources that can reference a resource group template. A partition provides an administrative and runtime subdivision of the domain, and contains one or more resource groups. Each resource group can reference a resource group template, to bind deployable resources to partition-specific values, for use by the referencing partition. A tenant of the application server or cloud environment can be associated with a partition, or applications deployed therein, for use by that tenant.

CLAIM OF PRIORITY

This application is a continuation of U.S. Patent Application titled “SYSTEM AND METHOD FOR SUPPORTING MULTI-TENANCY IN AN APPLICATION SERVER, CLOUD, OR OTHER ENVIRONMENT”, application Ser. No. 15/948,721, filed on Apr. 9, 2018, and issued as U.S. Pat. No. 10,742,568; which is a continuation of U.S. Patent Application titled “SYSTEM AND METHOD FOR SUPPORTING MULTI-TENANCY IN AN APPLICATION SERVER, CLOUD, OR OTHER ENVIRONMENT”, application Ser. No. 14/601,883, filed on Jan. 21, 2015, and issued as U.S. Pat. No. 9,961,011; which claims the benefit of priority to U.S. Provisional Application titled “SYSTEM AND METHOD FOR SUPPORTING MULTITENANCY IN AN APPLICATION SERVER, CLOUD, OR OTHER ENVIRONMENT”, Application No. 61/929,888, filed on Jan. 21, 2014; and U.S. Provisional Application titled “SYSTEM AND METHOD FOR SUPPORTING MULTITENANCY IN AN APPLICATION SERVER, CLOUD, OR OTHER ENVIRONMENT”, Application No. 62/015,966, filed on Jun. 23, 2014; each of which above applications are herein incorporated by reference.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.

FIELD OF INVENTION

Embodiments of the invention are generally related to application servers and cloud environments, and are particularly related to a system and method for supporting multi-tenancy in such environments.

BACKGROUND

Application servers generally provide a managed environment within which software applications can be deployed and run. Cloud-based environments allow applications to run within and take advantage of the distributed resources provided by a cloud. Such environments can support large numbers of users or tenants, some of which may have specific requirements that are particular to that user or tenant. These are some examples of the type of environments in which embodiments of the present invention can be used.

SUMMARY

In accordance with an embodiment, described herein is a system and method for supporting multi-tenancy in an application server, cloud, on-premise, or other environment, which enables categories of components and configurations to be associated with particular application instances or partitions. Resource group templates define, at a domain level, collections of deployable resources that can be referenced from resource groups. Each resource group is a named, fully-qualified collection of deployable resources that can reference a resource group template. A partition provides an administrative and runtime subdivision of the domain, and contains one or more resource groups. Each resource group can reference a resource group template, to bind deployable resources to partition-specific values, for use by the referencing partition. A tenant of the application server or cloud environment can be associated with a partition, or applications deployed therein, for use by that tenant.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 illustrates a system for supporting multi-tenancy in an application server, cloud, or other environment, in accordance with an embodiment.

FIG. 2 further illustrates a system for supporting multi-tenancy in an application server, cloud, or other environment, in accordance with an embodiment.

FIG. 3 further illustrates a system for supporting multi-tenancy in an application server, cloud, or other environment, in accordance with an embodiment.

FIG. 4 illustrates an exemplary use of resource group templates, in accordance with an embodiment.

FIG. 5 illustrates an exemplary multi-tenant environment, in accordance with an embodiment.

FIG. 6 illustrates a system that supports partition-unaware and partition-aware components, in accordance with an embodiment.

FIG. 7 illustrates access by multiple tenants to partitions in an application server, cloud, or other environment, in accordance with an embodiment.

FIG. 8 illustrates a method of supporting multi-tenancy in an application server, cloud, or other environment, in accordance with an embodiment.

DETAILED DESCRIPTION

As described above, application servers generally provide a managed environment within which software applications can be deployed and run. Cloud-based environments allow applications to run within and take advantage of the distributed resources provided by a cloud. Such environments can support large numbers of users or tenants, some of which may have specific requirements that are particular to that user or tenant.

To address the needs of such environments, in accordance with an embodiment, described herein is a system and method for supporting multi-tenancy in an application server, cloud, on-premise, or other environment, which enables categories of components and configurations to be associated with particular application instances or partitions. Resource group templates define, at a domain level, collections of deployable resources that can be referenced from resource groups. Each resource group is a named, fully-qualified collection of deployable resources that can reference a resource group template. A partition provides an administrative and runtime subdivision of the domain, and contains one or more resource groups. Each resource group can reference a resource group template, to bind deployable resources to partition-specific values, for use by the referencing partition. A tenant of the application server or cloud environment can be associated with a partition, or applications deployed therein, for use by that tenant.

For example, Java EE application servers, such as Oracle WebLogic Server (WLS) and Glassfish, can run Java archives with a degree of isolation. In accordance with an embodiment, a software application can be viewed as comprising a first category of components or configurations being a set of Java archives or other components that are managed at a system or domain level; and a second category being a configuration required to run those archives and managed at an application level. An instance of system or domain components can be run with several sets of instances or partitions of application components, with particular partitions mapping to particular tenants.

In accordance with an embodiment, the system can support multi-tenant use cases that provide software-as-a-service (SaaS), or platform-as-a-service (PaaS) capabilities, and require a means of distinguishing between different tenants.

For example, in a SaaS use case, the system can enable sharing of an application server infrastructure among multiple tenants, using a tenant-aware application that recognizes different tenants. Based on a user's identity, a tenant-aware application can determine the particular tenant to which the user belongs, and use that information to access a resource, such as a tenant-specific database connection or a JMS queue, that is pertinent to that particular tenant.

As another example, in a PaaS use case, the system can enable multiple tenants to run different applications, with little or no overlap between the various tenant environments, and for each particular tenant to be able to administer certain aspects of their own runtime environment, such as deploying applications for those users associated with that particular tenant.

As another example, in the case of enterprise software application environments, such as Oracle Fusion Applications, which may include applications that are not themselves tenant-aware, but it is desired to simplify the application lifecycle, the system can support usage of a single copy of an application installation which can be realized at runtime as multiple different copies. Each copy can run within its own partition and use a different classloader, allowing each copy to connect to different databases, or to different portable databases (PDB) running within a same container database (CDB).

In accordance with other embodiments, the system can also address traditional use cases, so that users can use a multi-tenant version of an application server in a similar manner as they had previously, and are not required to use any of its multi-tenancy features.

Various other use cases and examples are described in further detail below, including, for purposes of illustration, embodiments of a multi-tenant WLS application server environment (referred to herein as WLS-MT). In accordance with other embodiments, similar functionality and features can also be provided for use with other application server, cloud, on-premise, or other environments.

Multi-Tenant Environment

FIG. 1 illustrates a system for supporting multi-tenancy in an application server, cloud, or other environment, in accordance with an embodiment.

As illustrated in FIG. 1, in accordance with an embodiment, a multi-tenant application server environment 100, for example an application server or other component that enables software applications to be deployed and run within the environment, can be configured to include and to operate according to an application server domain configuration 102, which is used at runtime to define an application server domain.

In accordance with an embodiment, the application server can further include one or more partitions 104 that are defined for use at runtime. Each partition can be associated with a partition identifier (ID) and configuration, and can further include one or more resource groups 124, together with a reference to a resource group template 126, and/or other partition-specific applications or resources 128.

In accordance with an embodiment, additional resource groups, applications and/or resources 140 can also be defined at the domain level, optionally together with a reference to a resource group template.

In accordance with an embodiment, the application server can further include one or more resource group templates 160 that are defined for use at runtime. Each resource group template can include one or more application deployments 162, 164, resources 166, 168, and/or other deployable applications or resources 170.

In accordance with an embodiment, each resource group can reference a resource group template. For example, the illustrated resource group 124 in partition 104, can reference 190 the resource group template 160.

Generally, a system administrator can create or delete partitions, domain-level resource groups are referenceable from partitions, realms, and domain-level resource group templates. A partition administrator can typically administer various aspects of their own partition, for example, create resource groups, deploy applications to the partition, and reference specific realms for the partition.

In accordance with some embodiments, a tenant administrator role can also be defined to support tenant-level administrative tasks, although such tasks can alternatively be driven by the components themselves, and thereafter map to corresponding system-level or partition-level actions.

FIG. 2 further illustrates a system for supporting multi-tenancy in an application server, cloud, or other environment, in accordance with an embodiment.

As illustrated in FIG. 2, in accordance with an embodiment, a partition 202 can include, for example, a resource group 205 with reference to a resource group template 206, a virtual target/virtual host information 207, and a PDB information 208. A resource group template 210 can include, for example, a plurality of application deployments A 211 and B 212, together with deployable resources, such as a JMS server 213, a JMS system resource 214, an SAF agent 215, a mail session component 216, and a JDBC system resource 217. The partition and resource group template illustrated in FIG. 2 is provided merely by way of example, and in accordance with other embodiments different partition and/or resource group template elements can be provided.

In accordance with an embodiment, a partition (for example, partition 202), can reference or extend 220 a particular resource group template (for example, resource group template 210). Such referencing enables, for example, a PDB information associated with a particular partition to be used in combination with the referenced resource group template, to indicate a partition-specific information 230 for the partition, such as a partition-specific PDB information. The partition-specific PDB information can then be used by the application server to configure resources for use by the partition.

For example, as illustrated in FIG. 2, the partition-specific PDB information associated with partition 202 can be used, by the application server, to configure 232 a container database 236 with an appropriate PDB 238, for use by that partition.

Similarly, in accordance with an embodiment, a virtual target/virtual host information associated with a particular partition can be used to define 239 a partition-specific virtual target/virtual host 240, for use by the partition, which in the illustrated example can then be made accessible at baylandurgentcare.com.

FIG. 3 further illustrates a system for supporting multi-tenancy in an application server, cloud, or other environment, in accordance with an embodiment.

In accordance with an embodiment, a configuration which is defined, for example, by a configuration file such as a config.xml file, can be used to define a partition, including elements for resource groups associated with that partition, database, and/or other partition properties. Values can be specified per partition using, e.g., property name/value pairs in resource groups. Resource groups can be globally defined at the domain level, or can be specific to a partition.

As illustrated in FIG. 3, in accordance with an embodiment, a plurality of partitions can be executed within a managed server/cluster 242, or a similar environment which can provide access to a container database 243, and which is accessible via a web tier 244. In accordance with an embodiment, a domain can generally correspond to the container database, with each partition or tenant implicitly associated with one or more of the PDBs of the container database.

In accordance with an embodiment, each of the plurality of partitions, in this example a partition A 250 and a partition B 260, can be configured to include a plurality of resources associated with that partition. In the example illustrated, partition A can be configured to include a resource group 251 which contains an application A1 252, application A2 254, and JMS A 256, together with a datasource A 257 that is associated with a PDB A 259 in the container database, wherein the partition is accessible via a virtual target/virtual host A 258. Similarly, in this example, partition B 260 can be configured to include a resource group 261 which contains an application B1 262, application B2 264, and JMS B 266, together with a datasource B 267 that is associated with a PDB B 269 in the container database, wherein the partition is accessible via a virtual target/virtual host B 268.

While several of the above examples illustrate use of a CDB and PDBs, in accordance with other embodiments, other types of multi-tenant and non-multi-tenant databases can be supported wherein a specific configuration can be provided for each partition, for example through the use of schemas, or different databases.

Tenants

In accordance with an embodiment, a tenant is an entity that can be represented by, or otherwise associated with, one or more partitions, and/or one or more tenant-aware applications.

For example, in accordance with an embodiment, tenants can represent distinct user organizations, such as different external companies, or different departments within a particular enterprise (e.g., HR and Finance departments), each of which can be associated with a different partition. A tenant identity (ID) is the association of a particular user, at a particular moment in time, with a particular tenant. The system can derive which tenant the particular user belongs to from the user identity, for example by referring to a user identity store. The user identity also enables the system to enforce those actions that a user is authorized to do as they move throughout the system, including, but not limited to, which tenant the user may belong.

In accordance with an embodiment, the system enables isolation of the administration and runtime of different tenants from each other. For example, tenants can configure some behaviors of their applications, and resources to which they have access. The system can ensure that a particular tenant cannot administer artifacts belonging to another tenant; and, at runtime, that applications working on behalf of a particular tenant refer only to resources pertinent to that tenant, and not to resources associated with other tenants.

In accordance with an embodiment, a tenant-unaware application is one that contains no logic dealing with tenants explicitly. Any resources that the application uses are in play regardless of what user submitted a request to which the application is responding. In contrast a tenant-aware application does contain logic that explicitly deals with tenants. For example, based on a user's identity the application can derive the tenant to which the user belongs and use that information to access tenant-specific resources.

In accordance with an embodiment, the system enables users to deploy applications that are explicitly written to be tenant-aware, so that application developers can obtain the tenant ID of a current tenant. The tenant-aware application can then use the tenant ID to handle multiple tenants that are using a single instance of the application.

For example, in accordance with an exemplary embodiment described in further detail below, a sample tenant-aware application “MedRec”, which supports a single doctor's office or hospital, can be exposed to two different tenants, e.g., Bayland Urgent Care, and Valley Health, each of which is able to access separate tenant-specific resources, such as separate PDBs, without changing the underlying application code.

Resources

In accordance with an embodiment, a resource is a system resource, application, or other resource or object that can be deployed to a domain of the environment. For example, in accordance with an embodiment, a resource can be an application, JMS, JDBC, JavaMail, WLDF, data source, or other system resource or other type of object that can be deployed to a server, cluster, or other application server target.

Partitions

In accordance with an embodiment, a partition is a runtime and administrative slice of a domain, that can be associated with a partition ID and configuration, and can contain applications and/or refer to domain-wide resources through the use of resource groups and resource group templates.

Generally, the system can be configured to provide tenant access to the administrative and runtime aspects of partitions associated with that tenant. A partition can contain its own applications, refer to domain wide applications via resource group templates, and have its own configuration. Partitionable entities can include resources as described above, for example JMS, JDBC, JavaMail, WLDF resources, in addition to other components, such as JNDI namespace, network traffic, work managers, and security policies and realms.

In accordance with an embodiment, each resource group within a partition can refer to zero or more resource group templates, while a particular resource group template can be referenced from multiple partitions. Each partition can also define properties for configuration data that is not specified in the resource group templates to which the partition's resource groups refer. This enables the partition to act as a binding of deployable resources defined in resource group templates, to specific values for use within that partition. In some cases, a partition can also override certain configuration information specified by a resource group template.

In accordance with an embodiment, a partition configuration, as defined for example by a configuration file (e.g., config.xml), can include a plurality of configuration elements, such as: “partition”, which contains the attributes and child elements that define the partition; “resource-group”, which contains the applications and resources deployed to the partition; “resource-group-template”, which contains applications and resources; “jdbc-system-resource-override”, which contains a DB-specific service name, user name, and password; and “partition-properties”, which contains property key values that can be used for macro replacement in resource group templates.

Exemplary fragments of configuration files for use with the MedRec application are illustrated below, showing how the configuration file may appear for a partition, in which the resource group template contains several application deployments, a JMS server, a mail session, a JMS system resource, a JDBC system resource, and an SAF agent. Upon startup, the system can use the information provided by the configuration file to generate partition-specific configuration elements for each resource, from the resource group template:

<partition> <name>Partition-0</name> <resource-group> <name>PartitionResourceGroup-0</name> <app-deployment> <name>shoppingcart</name> <module-type>war</module-type> <source-path>/Users/chanpate/Downloads/shoppingcart.war</source-path> <security-dd-model>DDOnly</security-dd-model> <staging-mode xsi:nil=“true”></staging-mode> <plan-staging-mode xsi:nil=“true”></plan-staging-mode> <cache-in-app-directory>false</cache-in-app-directory> </app-deployment> <target>VirtualTarget-0</target> </resource-group> <jdbc-system-resource-override> <name>JDBCSystemResourceOverride-0</name> <data-source-name>JDBC1</data-source-name> <url>jdbc:oracle:thin:@system.slc07gwu:8989</url> <user>sys</user> <password- encrypted>{AES}oCk9VWCKfua2xZ/fWffclORE9Yj6JHnHfOM/TAI3gco=</password- encrypted> </jdbc-system-resource-override> <available-target>VirtualTarget-0</available-target> <partition-id>71838f74-c7e8-46f0-9a94-c20dfe346d37</partition-id> <system-file-system> <root>/Users/chanpate/wls-setup/partitions/Partition-0/system</root> <create-on-demand>true</create-on-demand> <preserved>true</preserved> </system-file-system> </partition> <partition> <name>partition1</name> <resource-group> <name>partition1-rg</name> <resource-group-template>MedrecRGT</resource-group-template> <target>partition1</target> </resource-group> <jdbc-system-resource-override> <name>MedRecGlobalDataSourceXA</name> <data-source-name>MedRecGlobalDataSourceXA</data-source-name> <url>jdbc:derby://localhost:1528/mtdb2;create=true</url> <user>scott</user> <password- encrypted>{AES}TxJOS7kX8M6G2ICNa6EYX2Lno/GoeF1UaLT4gL88x6U=</password- encrypted> </jdbc-system-resource-override> <default-target>partition1</default-target> <available-target>partition1</available-target> <realm>partition1-realm</realm> <partition-id>a2eee77e-4340-403a-947e-fa3932f4a04f</partition-id> </partition> <partition> <name>partition2</name> <resource-group> <name>partition2-rg</name> <resource-group-template>MedrecRGT</resource-group-template> <target>partition2</target> </resource-group> <jdbc-system-resource-override> <name>MedRecGlobalDataSourceXA</name> <data-source-name>MedRecGlobalDataSourceXA</data-source-name> <url>jdbc:derby://localhost:1529/mtdb3;create=true</url> <user>scott</user> <password- encrypted>{AES}6AY+so/KxRKZckcjuS6vwnlG+WAAfuqsGGfMuIE3JjY=</password- encrypted> </jdbc-system-resource-override> <default-target>partition2</default-target> <available-target>partition2</available-target> <realm>partition2-realm</realm> <partition-id>96f1b8c6-0337-4f44-a321-6d6911671fc2</partition-id> </partition> <resource-group-template> <name>MedrecRGT</name> <app-deployent> <name>medrec</name> <module-type>ear</module-type> <source-path> /scratch/stjpg/weblogic/src1214_build/Oracle_Home /dev.install-12.2.1.0.0-20150120233607.460/wlserver /samples/server/medrec/dist/standalone/medrec.ear </source-path> <plan-path> /scratch/stjpg/weblogic/dev/src1214/wlstest/integration /mt/common/apps/medrec/plans/plan.xml </plan-path> <security-dd-model>DDOnly</security-dd-model> <staging-mode xsi:nil=“true”/> <plan-staging-mode xsi:nil=“true”/> <cache-in-app-directory>false</cache-in-app-directory> </app-deployment> <app-deployment> <name>physician</name> <module-type>ear</module-type> <source-path> /scratch/stjpg/weblogic/src1214_build/Oracle_Home /dev.install-12.2.1.0.0-20150120233607.460/wlserver /samples/server/medrec/dist/ standalone/physician.ear </source-path> <security-dd-model>DDOnly</security-dd-model> <staging-mode xsi:nil=“true”/> <plan-staging-mode xsi:nil=“true”/> <cache-in-app-directory>false</cache-in-app-directory> </app-deployment> <app-deployment> <name>chat</name> <module-type>war</module-type> <source-path> /scratch/stjpg/weblogic/src1214_build/Oracle_Home /dev.install-12.2.1.0.0-20150120233607.460/wlserver /samples/server/medrec/dist/standalone/chat.war </source-path> <security-dd-model>DDOnly</security-dd-model> <staging-mode xsi:nil=“true”/> <plan-staging-mode xsi:nil=“true”/> <cache-in-app-directory>false</cache-in-app-directory> </app-deployment> <jms-server> <name>MedRecJMSServer</name> </jms-server> <mail-session> <name>myMailSession</name> <jndi-name>mail/MedRecMailSession</jndi-name> <properties> mail.smtp.host=sca00bfc.us.oracle.com;mail.smtp.port=9872 </properties> </mail-session> <jms-system-resource> <name>MedRec-jms</name> <sub-deployment> <name>MedRecJMSSubD</name> <target>MedRecJMSServer</target> </sub-deployment> <descriptor-file-name> resource-group-templates/MedrecRGT/jms/medrec-jms.xml </descriptor-file-name> </jms-system-resource> <jdbc-system-resource> <name>MedRecGlobalDataSourceXA</name> <descriptor-file-name> resource-group-templates/MedrecRGT/jdbc/ MedRecGlobalDataSourceXA-9669-jdbc.xml </descriptor-file-name> </jdbc-system-resource> </resource-group-template> Resource Groups

In accordance with an embodiment, a resource group is a named, fully-qualified collection of deployable resources that can be defined either at a domain or partition level, and can reference a resource group template. The resources in a resource group are considered fully-qualified in that the administrator has provided all of the information needed to start or connect to those resources, for example the credentials for connecting to a data source, or the targeting information for a Java application.

In accordance with an embodiment, a system administrator can declare zero or more resource groups at the domain level, and one or more at the partition level.

At the domain level, a resource group provides a convenient way to group related resources. The system can manage resources declared in a domain-level resource group the same as ungrouped resources, so that the resources can be started during system start-up, and stopped during system shut-down. An administrator can also stop, start, or remove a resource in a group individually, and can act on all the resources in a group implicitly by operating on the group.

For example, stopping the resource group stops all of the resources in the group that are not already stopped; starting the resource group starts any resources in the group that are not already started; and removing the resource group removes all of the resources contained in the group.

At the partition level, a partition administrator can configure one or more resource groups in their partition, subject to any security restrictions. For example, in a SaaS use case, domain-level resource group templates can be defined, and various partition level resource groups can refer to those templates. In a PaaS use case, partition-level resource groups can be created that do not refer to templates, but instead represent applications and their related resources that are to be made available within that partition only.

In accordance with an embodiment, resource grouping can be used to group together Java applications and the resources they use as a distinct administrative unit within the domain. For example, in the MedRec application, a resource grouping may define the MedRec application and its resources. Multiple partitions can run the same MedRec resource group, although they use some tenant-specific configuration information, such that the Java applications that are part of each MedRec application resource instance are made specific to each tenant.

Resource Group Templates

In accordance with an embodiment, a resource group template is a collection of deployable resources defined at a domain level, that can be referenced from a resource group, and that supports the specification of partition level configuration. Not all configuration need be specified at the domain level—partition level configuration can instead be specified in the resource group template through the use of macros, for example as property name/value pairs.

In accordance with an embodiment, a resource group template is a collection of deployable resources in which at least some of the information required to activate its resources may not be stored as part of the template itself. Some of the information about such resources may be the same across all tenants, while other information may vary from one tenant to the next.

For example, in accordance with an embodiment of a SaaS use case, the system can activate the same applications and resources multiple times, once for each partition that will use them. When an administrator defines a resource group template they can use tokens to represent the information that will be supplied elsewhere. For example, the username to use in connecting to a CRM-related data resource can be indicated in the resource group template as \${CRMDataUsername}.

In accordance with an embodiment, a particular resource group template can be referenced by zero or more resource groups. The object containing the resource group, e.g., the domain or partition, can use property name/value assignments to set the value of any tokens in the resource group template. When the system activates a resource group template using a referencing resource group, it can replace those tokens with values set in the resource group's containing object.

In some cases, the system can also use statically-configured resource group templates and partitions to generate runtime configuration for each partition/template combination.

In accordance with an embodiment, a domain can contain any number of resource group templates, each of which can include, for example, one or more related Java applications and the resources on which those applications depend.

Networking Layer

In accordance with an embodiment, the system can include a networking layer that associates incoming requests with a partition ID. For example, based on a request URL (e.g., a virtual target/virtual host plus optional path), the networking layer can determine a target partition for the request, and add the determined partition ID to the request's execution context. In accordance with an embodiment, if each partition is configured to use a unique virtual target/virtual host and network access point (NAP) combination, then the system can map all requests on a particular virtual target/virtual host to the corresponding partition. If partitions are instead configured to share virtual targets/virtual hosts, then a path can be defined for the virtual target/virtual host, so that the system can determine the appropriate partition based on the virtual target/virtual host plus the configured path.

Work Manager

In accordance with an embodiment, the system can include partition-aware work managers. Each work manager can be configured with a relative priority of workload, together with a minimum threads constraint to ensure that a thread is always available for processing work requests to avoid deadlock, and a maximum threads constraint to limit the number of concurrent threads executing requests. A partition-specific work manager can be created for each partition, to ensure that applications within each partition do not exceed their configured fair share of thread resource usage for that partition.

Security Realms

In accordance with an embodiment, each partition can reference a security realm. Realms can also be referenced by multiple partitions. As described above, when a request enters the system, the system can determine the appropriate partition from the virtual target/virtual host, and store the partition ID in the request's execution context. Subsequently, when an authentication or authorization action is required, the system can utilize the partition ID to determine the appropriate realm to use.

JNDI

In accordance with an embodiment, a partition-aware JNDI framework enables applications to bind named objects and retrieve them on a per-partition basis. During startup and deployment time, application server containers can associate each partition-specific application with a corresponding partition ID. The JNDI framework can then utilize that partition ID during a bind or lookup of a named object. Partition-specific objects can be isolated from other partitions, which allows different instances of the same application to register partition-specific objects with the same JNDI name.

End-to-End Lifecycle Management

In accordance with an embodiment, providers can be used to wire infrastructure components needed to run a particular application, for example Oracle Traffic Director (OTD), database, Coherence, or JMS components.

For example, in some embodiments, the partition-specific instances of a particular application can share a same database instance. A resource group template can refer to a domain-level JDBC system resource for the single database instance, and all partitions which reference that resource group template can then use the same database instance.

In accordance with an embodiment, the several partition-specific instances of an application can connect to different database instances with common, or compatible schemas. The resource group template can declare a JDBC system resource, leaving some of the configuration to be specified in the respective partition sections of the configuration file (e.g., config.xml). Examples of such partition-level configuration for data sources can include a URL to which to connect, and/or the user credentials for authenticating and authorizing access to the referenced database instance.

In accordance with an embodiment, the data source implementation can create a separate physical connection pool for each partition to an assigned PDB within a container database, which allows the PDBs to appear to the application server as separate databases, and each partition's specific credentials to be used to establish one or more connections for the partition within that partition's pool.

Alternatively, the system can support connection-switching across PDBs, in which a separate PDB can be provided for each partition, but the data source implementation shares a single connection pool to the container database which owns the PDBs. When an application submits data requests, it does so in the context of a partition. The system can then use the partition ID to switch a shared connection to the correct partition context, before executing the request on that connection.

Application Deployment and Configuration

In accordance with an embodiment, applications can be deployed to a resource group template at the domain level, or to a resource group that is scoped to a partition or scoped to the domain. Application configuration can be overridden using deployment plans specified per application, per partition. Deployment plans can also be specified as part of a resource group. Some example application deployment commands are illustrated below.

Deploying to a resource group template in a domain:

java weblogic.Deployer ... -deploy -resource-group-template healthcareresources-template -name pharmacy pharmacy-app.ear Deploying to a resource group in a partition:

java weblogic.Deployer ... -deploy -partition t1 -resource-group healthcare-resources -name pharmacy pharmacy-app.ear Deploying to a resource group in a partition with a deployment plan:

java weblogic.Deployer ... -deploy -partition t1 -resource-group healthcare-resources -plan pharmacy-plan.xml -name pharmacy pharmacyapp.ear

FIG. 4 illustrates an exemplary use of resource group templates, in accordance with an embodiment.

In accordance with an embodiment, when the system starts partitions, it creates virtual targets/virtual hosts and connection pools, including one for each of the partitions, to respective database instances, according to the provided configuration.

Typically, each resource group template can include one or more related Java applications and the resources on which those applications depend. As described above, each partition can provide any configuration data that is not specified in the resource group templates to which it refers, by providing a binding of the deployable resources in resource group templates, to specific values associated with the partition; and, in some cases, can override certain configuration information specified by the resource group template. This enables the system to activate an application represented by a resource group template differently for each partition, using the property values each partition has defined.

In some instances, a partition may contain self-contained resource groups that do not refer to resource group templates, or that directly define their own partition-scoped deployable resources. Applications and data sources that are defined within a partition are generally available only to that partition. In accordance with an embodiment, the system does not require or enforce either practice—users can use either type of resource group within their partitions, regardless of the intended use case.

As illustrated in FIG. 4, for example, the MedRec application can include four Java applications, a data source, a JMS server, and a mail session. To run the MedRec application for multiple tenants, the system administrator can define a single resource group template for MedRec 286, declaring those deployable resources in the template.

As described above, in contrast to domain-level deployable resources, the deployable resources declared in a resource group template may not be fully configured in the template.

For example, the MedRec resource group template may declare a data source used by the Java applications, but it may not specify the URL for connecting to the database. Typically some of the resources declared in a resource group template cannot be activated as-is, since they lack some configuration information. Partitions associated with different tenants, for example, partition BUC-A 290 (Bayland Urgent Care) and partition VH-A 293 (Valley Health) can reference 292, 294 various resource group templates, including a MedRec resource group 295 that references 296 the MedRec resource group template.

In accordance with an embodiment, the reference can then be used to create 302, 306, the virtual targets/virtual hosts for each tenant, including a virtual host baylandurgentcare.com 304 associated with the BUC-A partition, for use by the Bayland Urgent Care tenant; and a virtual host valleyhealth.com 306 associated with the VH-A partition, for use by the Valley Health tenant.

FIG. 5 illustrates an exemplary multi-tenant environment, in accordance with an embodiment.

As illustrated in FIG. 5, and continuing the example from above, in which two partitions reference the MedRec resource group template, in accordance with an embodiment, a servlet or servlet engine can be used 310, to support a plurality of tenant environments, in this example a Bayland Urgent Care Physician environment 320, and a Valley Health Physician environment 330.

In accordance with an embodiment, each partition can define a different virtual target/virtual host on which to accept incoming traffic, and a different URL 322, 332 for connecting to its data source, in this example either a bayland urgent care database 324, or a valley health database 334 respectively. The two database instances can have compatible schemas, since the same application code will execute against both databases. When the system starts the partitions, it can create the virtual targets/virtual hosts and connection pools, one for each of the partitions, to its respective database instance.

In accordance with an embodiment, selecting which users can administer a partition is closely related to which general use case is desired. For example, in a SaaS use case, the application server system administrator may manage all of the partitions and their resource instances; whereas in a PaaS use case, each partition administrator may administer their respective partitions and the resources within them.

FIG. 6 illustrates a system that supports partition-unaware and partition-aware components, in accordance with an embodiment.

As illustrated in FIG. 6, in accordance with an embodiment, the environment can include physical computer resources, for example, CPU, physical memory, and network components 340, a multi-tenant application server (e.g. WLS-MT) partition implementation 342, and one or more partition-unaware application server components 344, and/or partition-aware application server components. A traditional, e.g., Java, application 350 may include only partition-unaware components, in this example a servlet container component 352, and an EJB container component 354. A partition-aware Java application 360 can include both partition-unaware components, and also partition-aware component, including in this example JNDI 362, config 364, security 366, networking 368, data 370, application container 372 or diagnostic 374 components.

Partition Identifiers

In accordance with an embodiment, the system includes support for partition identifiers (IDs), which can be used to allow any part of the system that is partition-aware to detect on which partition's behalf it is working (i.e., a “current” partition). In accordance with an embodiment, the partition identifier becomes part of the execution context, so that any component that needs the partition ID can obtain it using an appropriate API. In accordance with an embodiment, any component that does work on behalf of a partition, and dispatches work to another thread, must propagate the partition ID to the new thread.

FIG. 7 illustrates access by multiple tenants to partitions in an application server, cloud, or other environment, in accordance with an embodiment.

As illustrated in FIG. 7, in accordance with an embodiment, partitions can be configured as described above, including partition A 380, B 382 and N 384.

For example, partition A can include resource group A 386, together with a reference 387 to resource group template A 390, and/or other partition-specific applications or resources 388. Other partitions can similarly include references 402, 404, 406, 408 to one or more resource group templates as appropriate, such as resource group template B 394. Tenants associated with the different partitions, including in this example tenants A 410, B 412, and N 414, can access 420, 422, 424 their own partition and the application instance and resources therein.

In accordance with an embodiment, the networking subsystem can associate a partition ID with an execution context when a request arrives over a http/https, T3, or other protocol. For example, a partition may be configured to use a particular virtual target/virtual host. The networking subsystem can recognize that association and use it to associate requests that arrive via that virtual target/virtual host with that partition, which enables the system to create the required partition-specific instances of the resources during start-up and to operate on the correct partition-specific instances throughout the processing.

In accordance with an embodiment, the system can use similar functionality as described above, to support many thousands or millions of tenants within an application server, cloud or other environment, each of which can be associated with their own partition and its particular configuration and application server instance.

Channels

In accordance with an embodiment, the system can include support for channels, including use of a PartitionValidatorService that, given certain keys, returns a partition ID to use. For example, servers can communicate using RJVMs and configured channels. In accordance with an embodiment, the system can provide one channel for use by all partitions, and provide each partition with its own dedicated, e.g., T3 connection. This reduces the need to create channels for each partition, since all partitions can share the same port.

Alternatively, in accordance with an embodiment, if multiple channels are configured, then a means of channel selection can be used. For example, all tenant traffic can have a channel name associated it, and a default channel can be used when partition ID is not available. If no partition and no channel are specified, then a default channel can be used. If no partition is specified, but a channel is, then the system can use the specified channel. If a partition is specified, but no channel is, then the partition ID can used to determine a suitable channel. If both a partition and a channel are specified, then the channel name can take precedence.

In accordance with an embodiment, when communication is provided between a client and a server, the client can make an initial request, the server can respond, and client is authenticated and validated. The calculated partition can then be set on the thread local, for subsequent use. On the server side, the DNS name as well as any client-provided credentials can be provided to the PartitionValidatorService, to obtain the partition ID. Once the valid partition ID is obtained, it can be set on the thread local of the executing thread, so that all subsequent operations are performed within the scope of the associated tenant.

In accordance with an embodiment, a client can provide a PROVIDER_URL (e.g., of the form t3://<host>:<port>) to look up the initial context, and to find the channel to connect to its peer. An RJVM layer can maintain a mapping of partition ID plus channels to open connections, to find the appropriate connection to use for a particular PROVIDER_URL. Assuming that the partition ID is available on the thread, the RJVM layer can find an existing connection associated with the tenant to service the request, or alternatively create a new connection.

Method of Supporting Multi-Tenancy

FIG. 8 illustrates a method of supporting multi-tenancy in an application server, cloud, or other environment, in accordance with an embodiment.

As illustrated in FIG. 8, in accordance with an embodiment, at step 432, one or more computers, including an application server or cloud environment, are provided, together with a domain for execution of software applications, and one or more resources that can be deployed to the domain.

At step 433, one or more resource group templates are provided, wherein each resource group template is a collection of deployable resources defined at a domain level, that can be referenced from a resource group.

At step 434, one or more resource groups are provided, wherein each resource group is a named, fully-qualified collection of deployable resources that can reference a resource group template.

At step 436, one or more partitions are provided, wherein each partition provides an administrative and runtime subdivision of the domain and can include a resource group, and can reference a resource group template.

At step 437, a particular resource group template is reference from resource groups in one or more partitions, so that a referencing partition provides configuration data for use with the resource group template to which it refers (but is otherwise not provided by the resource group template), to bind deployable resources of the referenced resource group template to partition-specific values for use by the referencing partition.

At step 438, a particular tenant of the application server or cloud environment is associated with a partition, for use by the tenant.

Partition Templates

In accordance with an embodiment, the system includes support for partition templates. A single partition type can be implemented such that all instantiations of the partition type share the same hardware resources and all application resources are satisfied using the same set of infrastructure components. Alternatively, different partition types can define different quality of service characteristics.

For example the instantiation of a “gold” or “production” partition can be used to target better hardware than a “bronze” or “development” partition, or to offer higher performance or other benefits, relative to their counterparts associated with other types of partition.

The ability to associated partitions with various quality of service levels benefits both tenant-aware applications, and non-tenant-aware applications, since they both are influenced by the characteristics of the underlying hardware and provider instances. Within a single partition instance, the quality of service for multiple deployed applications can be tuned by controlling work manager thread constraints, allowing one application deployed to a partition to perform better than other applications deployed to the same partition. A system administrator can associate quotas to control instantiation of partitions; for example limiting instances of “gold” partitions to only a few, while allowing a greater number of “bronze” partitions.

Portable Partitions

In accordance with an embodiment, the system includes support for portable partitions. A partition can be exported to a partition archive which contains the partition's configuration, resource groups, and resource group templates, and optionally application binaries and deployment plans, but not application runtime state nor application specific runtime configuration. This enables a partition to be exported from a first, source, domain, and imported to a second, target, domain, for example using import and export operations on a PartitionMBean.

Domain-specific dependencies may need to be updated after import, for example, target cluster, security realm, and virtual hosts for which external connections may need to be resolved and re-wired, either by having the elements already configured in the domain using the same names, or by updating the partition after importing it into the target domain. This provides finer-grained control of procedures such as T2P, since instead of migrating a full domain, a single partition can be migrated without requiring shutdown or restart of either domain.

After importing the partition, a system administrator may need to further update the partition configuration to make it valid, for example by updating partition properties; PDB information, or other resources in the partition's resource groups. When importing a partition archive into the target domain it is possible that the shared resource group template may already exist in the target domain. In this case the import operation can detect if the existing resource group template is identical to the one contained in the archive; if so, then the existing resource group template will be used, otherwise the import will fail and require the user to retry the import indicating which resource group template should be used.

Partition Migration

In accordance with an embodiment, the system includes support for partition migration. For example, each partition can be created on a cluster of application servers. A partition can be migrated from one cluster to another for a variety of reasons, for example affinity/anti-affinity of a partition to other resources that the partition depends on such as database; or to prevent downtime for the partition when the underlying runtime needs maintenance.

Partition-Aware REST Administration APIs

In accordance with an embodiment, the system includes support for partition-aware REST administration APIs. REST APIs can include resources for multi-tenant configuration and administration, including the generating of REST resources from bean interfaces and annotations. Other features of REST APIs can include role-based visibility (e.g., who can see what information); security (e.g., who can change what configuration); shared infrastructure with JMX; and means for providing client visibility to partition identity. The use of http/https protocols means that access can be enabled and controlled using standard firewalls and front-end host configurations, which is useful in a multi-tenant environment where a particular partition administrator may be permitted access to only a narrow slice of ports and channels supported by an application server domain. The visibility of administration REST resources can be restricted to those appropriate for a partition administrator, such that server configuration using these REST APIs can be restricted to configuration resources that are scoped to that partition.

Partition-Aware Diagnostics, Logging and Monitoring

In accordance with an embodiment, the system includes support for partition-aware diagnostics, logging, and monitoring, for example through the use of partition-scoped metrics harvesting; partition-scoped WebLogic Diagnostic Framework (WLDF) watch rules and notifications; partition-aware diagnostic image dumps; and partition-scoped logging.

Partition-aware diagnostic image capture can be initiated by a partition administrator or watch rules in a partition-scoped WLDF system resource. The system can present filtered views of diagnostic information, so that a partition-level administrator can monitor their part of the system, without being able to see information associated with other partitions.

In accordance with an embodiment, each partition-related log record can be tagged with a relevant partition ID. When a partition administrator uses a log viewer, the system can filter the entries to be displayed, revealing only those log records that the viewing administrator is authorized to see.

In accordance with an embodiment, to support monitoring, the system can create partition-specific runtime MBeans corresponding to the partition-specific resources it has started on behalf of each partition. As with logging, the data visible to a partition administrator can be limited to data from that administrator's partition, using security controls based on, for example, the partition ID of the resource as compared with the partition ID of the administrator requesting access.

Partition-Aware Tagging

In accordance with an embodiment, the system includes support for partition-aware tagging. Tagging provides a generic mechanism of assigning human-readable names to resources. In accordance with an embodiment, tags can be applied to a resource or a group of resources, to provide a flexible way for selecting resources, such as provider runtimes.

Partition-Aware Edit Sessions

In accordance with an embodiment, the system includes support for partition-aware edit sessions. For example, an edit session can be provided per partition. A partition administrator can change any of the partition-related configuration within a partition-specific edit session.

Configuration and Runtime Mbeans

In accordance with an embodiment, the system supports the use of JMX and managed bean (MBeans) for both configuration and runtime monitoring.

For example, in accordance with an embodiment, a hierarchy of configuration MBeans can be provided to match configuration elements in a configuration file (e.g., config.xml), including appropriate MBeans for <partition>, <resource-group-template>, and nested resource elements. An exemplary configuration MBean hierarchy can be:

Domain MBean ResourceGroupTemplate MBeans JDBCSystemResource MBeans JMSSystemResource MBeans AppDeployment MBeans ... Partition MBeans JDBCSystemResourceOverride MBeans (Partition-specific resources) MBeans JDBCSystemResource MBeans JMSSystemResource MBeans AppDeployment MBeans ...

In accordance with an embodiment, each partition element can be defined using MBean APIs. In accordance with other embodiments, other MBeans and MBean APIs can be provided.

In accordance with an embodiment, a hierarchy of runtime MBeans can also be provided, including a ServerRuntimeMBean as the root node, which contains runtime MBeans for the application server, for example, clusters, server channels, JTA, and application resources. Partition-specific branches can be provided; for example, the JMSRuntimeMBean can contain partition-specific child MBeans for JMSConnectionRuntimeMBean, JMSServerRuntimeMBean, and JMSPooledConnectionRuntimeMBean):

ServerRuntime MBean PartitionRuntime MBeans JMSRuntime MBean JMSConnectionRuntime MBeans JMSServerRuntime MBeans JMSPooledConnectionRuntime MBeans JDBCServiceRuntime MBean JDBCDataSourceRuntime MBeans JDBCMultiDataSourceRuntime MBeans JDBCDriverRuntime MBeans ApplicationRuntime MBeans ComponentRuntime MBeans (component specific) WorkManagerRuntime MBeans LibraryRuntime MBean WLDFRuntime MBean WLDFAccessRuntime MBean ... MailSessionRuntime MBeans PersistentStoreRuntime MBeans PersistentStoreConnectionRuntime MBeans ConnectorServiceRuntime MBean ConnectorComponentRuntime MBeans PathServiceRuntime MBean PSAssemblyRuntime MBeans SAFRuntime MBean SAFAgentRuntime MBeans

In accordance with an embodiment, runtime MBeans for partition-specific resources can also be provided in a partition-specific hierarchy, rather than the global hierarchy at the ServerRuntime MBean level, which allows for partition-specific monitoring and statistics. The PartitionRuntimeMBean can contain component-specific MBeans for subsystems, such as JMS, JDBC, Deployment, WLDF, Coherence, and Connectors.

Example Configuration—SaaS Use Case

An exemplary configuration file (e.g., config.xml) for the MedRec application example is provided below, including a resource-group-template with multiple applications and resources, and having two partitions—in this example one partition for BayLand Urgent Care, and another for Valley Health. Each partition defines a resource-group that inherits the applications and resources from the template, and also contains a PDB information that is specific to that partition.

<domain> <resource-group-template> <name>MedRecResourceTemplate</name> <app-deployment> <name>medrec</name> . . . </app-deployment> <app-deployment> <name>physician</name> . . . </app-deployment> <app-deployment> <name>browser-starter</name> . . . </app-deployment> <app-deployment> <name>SamplesSearchWebApp</name> . . . </app-deployment> <jms-server> <name>MedRecJMSServer</name> </jms-server> <mail-session> <name>mail/MedRecMailSession</name> <jndi-name>mail/MedRecMailSession</jndi-name> <properties>mail.user=joe;mail.host=mail.mycompany.com</properties> </mail-session> <jms-system-resource> <name>MedRec-jms</name> <sub-deployment> <name>MedRecJMSServer</name> </sub-deployment> <descriptor-file-name>jms/MedRec-jms.xml</descriptor-file-name> </jms-system-resource> <jdbc-system-resource> <name>MedRecGlobalDataSourceXAc/name> <descriptor-file-name>jdbc/MedRecGlobalDataSourceXA-9669- jdbc.xml</descriptor-file-name> </jdbc-system-resource> <saf-agent> <name>WsrmAgent</name> <service-type>Both</service-type> </saf-agent> </resource-group-template> <partition> <name>BaylandUrgentCare</name> <resource-group> <name>BayLandMedRec</name> <resource-group-template>MedRecResourceTemplate</resource-group- template> </resource-group> <partition-pdb-info> <name>MedrecGlobalDataSourceXA</name> <data-source-name>MedRecGlobalDataSourceXA</data-source-name> <url>jdbc:oracle:thin:@(DESCRIPTION(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCI HOST=adc2111020.us.oracle.com) (PORT=5521)))(CONNECT_DATA=(SERVICE_NAME=cdb1_pdb1.regress.rdbms.dev.us. acle.com))) </url> <user>BUuser</user> <password-encrypted>{AES}xyz</password-encrypted> </partition-pdb-info> </partition> <partition> <name>ValleyHealth</name> <resource-group> <name>ValleyHealthMedRec</name> <resource-group-template>MedRecResourceTemplate</resource-group- template> </resource-group> <partition-pdb-info> <name>MedrecGlobalDataSourceXA</name> <data-source-name>MedRecGlobalDataSourceXA</data-source-name> <url>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCI HOST=adc2111020.us.oracle.com) (PORT=5521)))(CONNECT_DATA=(SERVICE_NAME=cdb1_pdb2.regress.rdbms.dev.us. acle.com))) </url> <user>VHuser</user> <password-encrypted>{AES}abc</password-encrypted> </partition-pdb-info> </partition> </domain> Example Configuration—PaaS Use Case

Another exemplary configuration file (e.g., config.xml) is provided below, in this example illustrating a configuration for resource group elements with partition-specific applications and resources. In this example, two partitions are configured, including one partition for a HR department, and another for a Finance department. Each partition defines a resource group that defines the applications that are specific to that partition. In this example there is no resource group template specified, since in this use case there are no multi-tenant applications shared between the partitions.

<domain> <partition> <name>HR</name> <resource-group> <name>HR Apps and Resources</name> <app-deployment> <name>HR App</name> . . . </app-deployment> <jdbc-system-resource> <name>HR DataSource</name> <descriptor-file-name>jdbc/HR-Datasource-jdbc.xml</descriptor- file-name> </jdbc-system-resource> </resource-group> </partition> <partition> <name>Finance</name> <resource-group> <name>Finance Apps and Resources</name> <app-deployment> <name>Finance App</name> . . . </app-deployment> <jdbc-system-resource> <name>Finance DataSource</name> <descriptor-file-name>jdbc/Finance-Datasource- jdbc.xml</descriptor-file-name> </jdbc-system-resource> </resource-group> </partition> </domain>

In accordance with an embodiment, a configuration can overridden using a deployment plan. An example configuration is provided below which illustrates a configuration for the MedRec application for a resource-group-template, including overrides for a deployment plan file name element. In this example there are again two partitions, one for BayLand Urgent Care, and another for Valley Health, each of which defines an application that overrides the resource group template deployment plan.

<domain> <resource-group-template> <name>MedRecResourceTemplate</name> <app-deployment> <name>medrec</name> <source-path>/apps/medrec/medrec.ear</plan-path> <plan-path>/apps/medrec/plan.xml</plan-path> </app-deployment> . . . </resource-group-template> <partition> <name>BaylandUrgentCare</name> <resource-group> <name>BayLandMedRec</name> <resource-group-template>MedRecResourceTemplate</resource-group- template> <app-deployment> <name>medrec</name> <plan-path>/apps/medrec/bay-land-plan.xml</plan-path> </app-deployment> </resource-group> . . . </partition> <partition> <name>ValleyHealth</name> <resource-group> <name>ValleyHealthMedRec</name> <resource-group-template>MedRecResourceTemplate</resource-group- template> <app-deployment> <name>medrec</name> <plan-path>/apps/medrec/valley-health-plan.xml</plan-path> </app-deployment> </resource-group> . . . </partition> </domain>

The present invention may be conveniently implemented using one or more conventional general purpose or specialized digital computer, computing device, machine, or microprocessor, including one or more processors, memory and/or computer readable storage media programmed according to the teachings of the present disclosure. Appropriate software coding can readily be prepared by skilled programmers based on the teachings of the present disclosure, as will be apparent to those skilled in the software art.

In some embodiments, the present invention includes a computer program product which is a non-transitory storage medium or computer readable medium (media) having instructions stored thereon/in which can be used to program a computer to perform any of the processes of the present invention. The storage medium can include, but is not limited to, any type of disk including floppy disks, optical discs, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.

The foregoing description of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to the practitioner skilled in the art.

For example, although for purposes of illustration many of the embodiments described above describe the use of multi-tenancy in WebLogic Server (WLS), multi-tenant WLS (WLS-MT), or Fusion Applications environments, similar functionality and features can be used with other application server, enterprise application, cloud, or other environments.

The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalence. 

What is claimed is:
 1. A system for supporting multi-tenancy in an application server, a cloud environment, or other environment, comprising: a computer that includes one or more processors and an application server, a cloud environment, or other environment executing thereon, and having a domain configuration that is used at runtime to define a domain for execution of software applications, and a plurality of resources accessible within the domain and adapted for use by the software applications; wherein the system operates at runtime to define a plurality of partitions of the domain, including wherein: each partition, of the plurality of partitions, is associated with a partition identifier that identifies the partition; and each partition, of the plurality of partitions, provides a subdivision of the domain for execution of the software applications and use of the plurality of resources within a context of the partition; and wherein each partition, of the plurality of partitions, is associated with a virtual target associated with the partition, and wherein upon a request received from a client directed to a particular virtual target, the system: determines a particular partition associated with the received request, and a particular partition identifier, and stores the particular partition identifier in a request execution context; and routes the received request to the particular partition, for use by the software applications associated with the particular partition.
 2. The system of claim 1, wherein the system is provided within a cloud environment that enables one or more partitions to be associated with a tenant for use by the tenant; wherein a partition identifier is associated with a tenant identifier; and wherein a tenant-aware application enables use of the tenant identifier to handle multiple tenants that are using a single instance of the tenant-aware application.
 3. The system of claim 1, wherein: a first partition is associated with a first partition identifier, and a first plurality of resources associated with the first partition, and is accessible by clients communicating requests to a first virtual target; and a second partition is associated with a second partition identifier, and a second plurality of resources associated with the second partition, and is accessible by clients communicating requests to a second virtual target.
 4. The system of claim 1, wherein the system includes a networking layer that associates incoming requests with partition identifiers based on a request Uniform Resource Locator (URL), and wherein the networking layer determines a target partition identifier for the received request, and adds the determined target partition identifier to the received request's execution context.
 5. The system of claim 1, wherein the system includes support for channels, including a channel for use by all partitions, and a dedicated channel for each partition of the plurality of partitions, and wherein if a partition is specified, then the partition identifier is used to determine a suitable channel.
 6. A method for supporting multi-tenancy in an application server, a cloud environment, or other environment, comprising: providing, at a computer that includes one or more processors and an application server, a cloud environment, or other environment executing thereon, and having a domain configuration that is used at runtime to define a domain for execution of software applications, and a plurality of resources accessible within the domain and adapted for use by the software applications; wherein a system operates at runtime to define a plurality of partitions of the domain, including wherein: each partition, of the plurality of partitions, is associated with a partition identifier that identifies the partition; and each partition, of the plurality of partitions, provides a subdivision of the domain for execution of the software applications and use of the plurality of resources within a context of the partition; and wherein each partition, of the plurality of partitions, is associated with a virtual target associated with the partition, and wherein upon a request received from a client directed to a particular virtual target, the system: determines a particular partition associated with the received request, and a particular partition identifier, and stores the particular partition identifier in a request execution context; and routes the received request to the particular partition, for use by the software applications associated with the particular partition.
 7. The method of claim 6, wherein the system is provided within a cloud environment that enables one or more partitions to be associated with a tenant for use by the tenant; wherein a partition identifier is associated with a tenant identifier; and wherein a tenant-aware application enables use of the tenant identifier to handle multiple tenants that are using a single instance of the tenant-aware application.
 8. The method of claim 6, wherein: a first partition is associated with a first partition identifier, and a first plurality of resources associated with the first partition, and is accessible by clients communicating requests to a first virtual target; and a second partition is associated with a second partition identifier, and a second plurality of resources associated with the second partition, and is accessible by clients communicating requests to a second virtual target.
 9. The method of claim 6, wherein the system includes a networking layer that associates incoming requests with partition identifiers based on a request Uniform Resource Locator (URL), and wherein the networking layer determines a target partition identifier for the received request, and adds the determined target partition identifier to the received request's execution context.
 10. The method of claim 6, wherein the system includes support for channels, including a channel for use by all partitions, and a dedicated channel for each partition of the plurality of partitions, and wherein if a partition is specified, then the partition identifier is used to determine a suitable channel.
 11. A non-transitory computer readable storage medium, including instructions stored thereon which when read and executed by one or more computers cause the one or more computers to perform a method comprising: providing, at a computer that includes one or more processors and an application server, a cloud environment, or other environment executing thereon, and having a domain configuration that is used at runtime to define a domain for execution of software applications, and a plurality of resources accessible within the domain and adapted for use by the software applications; wherein a system operates at runtime to define a plurality of partitions of the domain, including wherein: each partition, of the plurality of partitions, is associated with a partition identifier that identifies the partition; and each partition, of the plurality of partitions, provides a subdivision of the domain for execution of the software applications and use of the plurality of resources within a context of the partition; and wherein each partition, of the plurality of partitions, is associated with a virtual target associated with the partition, and wherein upon a request received from a client directed to a particular virtual target, the system: determines a particular partition associated with the received request, and a particular partition identifier, and stores the particular partition identifier in a request execution context; and routes the received request to the particular partition, for use by the software applications associated with the particular partition.
 12. The non-transitory computer readable storage medium of claim 11, wherein the system is provided within a cloud environment that enables one or more partitions to be associated with a tenant for use by the tenant; wherein a partition identifier is associated with a tenant identifier; and wherein a tenant-aware application enables use of the tenant identifier to handle multiple tenants that are using a single instance of the tenant-aware application.
 13. The non-transitory computer readable storage medium of claim 11, wherein: a first partition is associated with a first partition identifier, and a first plurality of resources associated with the first partition, and is accessible by clients communicating requests to a first virtual target; and a second partition is associated with a second partition identifier, and a second plurality of resources associated with the second partition, and is accessible by clients communicating requests to a second virtual target.
 14. The non-transitory computer readable storage medium of claim 11, wherein the system includes a networking layer that associates incoming requests with partition identifiers based on a request Uniform Resource Locator (URL), and wherein the networking layer determines a target partition identifier for the received request, and adds the determined target partition identifier to the received request's execution context.
 15. The non-transitory computer readable storage medium of claim 11, wherein the system includes support for channels, including a channel for use by all partitions, and a dedicated channel for each partition of the plurality of partitions, and wherein if a partition is specified, then the partition identifier is used to determine a suitable channel. 